﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace PRE.Catalog
{
    public partial class frmLogin : DevExpress.XtraEditors.XtraForm
    {
        //DAL.Entities_DAL.TaikhoanDAL _dal = new DAL.Entities_DAL.TaikhoanDAL();
        //BLL.Entities_BLL.TaikhoanBLL _bll = new BLL.Entities_BLL.TaikhoanBLL();
        public static int _login;

        public delegate void SendMessage(string Message);
        public SendMessage Sender;
        public string xxx;
        public frmLogin()
        {
            InitializeComponent();
            Sender = new SendMessage(GetMessage);
        }

        private void GetMessage(string Message)
        {
            //txtUser.Text = Message;
        }

        private void cmdDangnhap_Click(object sender, EventArgs e)
        {
            //var sss = (new BLL.Entities_BLL.TaikhoanBLL()).CheckLogin(txtUser.Text, txtPass.Text);
            //if (sss.Login)
            //{
            //    frmMain._sss = sss;
            //    MessageBox.Show("Bạn đã đăng nhập thành công!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //    xxx = txtUser.Text;
            //    frmHoadon _hd = new frmHoadon();
            //   // _hd.load.Text = xxx;
            //    Close();
            //}
            //else
            //{
            //    MessageBox.Show("Lỗi! Tài khoản hoặc mật khẩu không đúng!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            //    frmLogin_Load(sender, e);
            //}
        }

        private void frmLogin_Load(object sender, EventArgs e)
        {
        
        }

        private void cmdThoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void cmdLammoi_Click(object sender, EventArgs e)
        {
            txtUser.Text = "";
            txtPass.Text = "";
            txtUser.Focus();
        }
        
    }
}